import requestTypes from '../common';

// 事故上报列表
const getTroubleList = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/AccidentReport/QueryPageList',
		method: 'get',
		params: parameter,
	});
};


// 新增事故上报
const postTrouble = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/AccidentReport/Add',
		method: 'post',
		data: parameter,
		multiPartFormData: true,
	});
};
// 修改事故上报
const postChangeTrouble = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/AccidentReport/Update',
		method: 'post',
		data: parameter,
		multiPartFormData: true,
	});
};

// 删除事故上报
const postDeleteTrouble = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/AccidentReport/Delete',
		method: 'post',
		data: parameter,
	});
};
export { postFilesData, getTroubleList, postTrouble, postChangeTrouble, postDeleteTrouble };
